package com.example.statemachine.demo;


public class Test {

  public static void main(String[] args) {
    LibrarySystem librarySystem = new LibrarySystem();

    Book book1 = createBook(1, "book1");
    Member member1 = createMember(1, "member1");
    librarySystem.borrowBook(book1, member1);

    Book book2 = createBook(2, "book2");

    librarySystem.borrowBook(book2, member1);

    Book book3= createBook(3, "book3");
    Member member2 = createMember(2, "member2");
    librarySystem.borrowBook(book3, member2);

    librarySystem.showRecordList();


    librarySystem.returnBook(book1, member1);

    librarySystem.showRecordList();

  }

  public static Book createBook(int bookId, String bookName) {
    return new Book(bookId, bookName);
  }

  public static Member createMember(int memberId, String memberName) {
    return new Member(memberId, memberName);
  }


}
